
$(function(){
	songlist(12,1);
	$("#listview").listview('refresh');  
})

function songlist(index,tt){
	var musicList=$song_data[index].split("||");
	for(var i=0;i<20;i++)
	{
		var info=musicList[i].split("|");
	
		var li="<li data-role='fieldcontain'>"+
			   "<a>"+info[1]+"</a>"+
			   "<a href='javascript:download("+info[0]+",\""+info[1]+"\",\""+info[3]+"\",\"http://34642164.1.9ku.com"+info[4]+"\",\"http://www.9ku.com"+info[7]+"\");'  data-role='button'>下载</a>"+
			   "</li>";
		$("#listview").append(li);
	}
}

function download(id,name,singer,url,pic)
{
	var lrc="http://www.9ku.com/lrcshow.asp";
//	alert(lrc);
	DownloadPlugin.loadFile(id,name,singer,url,lrc);
	
	
/*
	var storage = window.localStorage;
	var musicList=JSON.parse(storage.getItem("musicList"));
	musicList.push({id:id,name:name,singer:singer,musicUrl:url});
	storage.setItem("musicList",musicList);
*/
}
